package com.lanchetech.dao;

import com.lanchetech.bean.request.LotteryOpportunityPageReq;
import com.lanchetech.bean.vo.LotteryOpportunityVO;
import com.lanchetech.entity.LotteryOpportunity;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface LotteryOpportunityMapper {
    int deleteByPrimaryKey(Long id);

    int insert(LotteryOpportunity record);

    int insertSelective(LotteryOpportunity record);

    LotteryOpportunity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(LotteryOpportunity record);

    int updateByPrimaryKey(LotteryOpportunity record);

    int batchInsert(@Param("list") List<LotteryOpportunity> list);

    LotteryOpportunity findOneByStatusAndUserId(@Param("status")Byte status,@Param("userId")Long userId);

    Long countByStatusAndUserId(@Param("status")Byte status,@Param("userId")Long userId);


    List<LotteryOpportunityVO> findAllPage(LotteryOpportunityPageReq req);

    Integer getLotteryOpportunity(Long id);
}